package org.zcl.sqlserver.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.data.annotation.Id;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * .
 *
 * @author zhuchenglin
 * @since 2024/7/19 14:48
 */
@Data
@Entity
@Table(name = "Notice", schema = "dbo")
public class Notice {

    @javax.persistence.Id
    @Id
    @Column(name = "id", unique = true, nullable = false) // 指定id字段的列名
    private Long id; // 将id类型改为String


    private String title;

    private String information;

    /**
     * 状态：1保存；2发布
     */
    private int status;

    private String goodsId;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private Date createTime;

    private String createUser;

    private Boolean delFlag;

    private Boolean factoryView = false;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }
}
